Optimal. Leaf size=178 \[ \frac {\left (c d^2-b d e+a e^2\right )^2 (d+e x)^{1+m}}{e^5 (1+m)}-\frac {2 (2 c d-b e) \left (c d^2-b d e+a e^2\right ) (d+e x)^{2+m}}{e^5 (2+m)}+\frac {\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) (d+e x)^{3+m}}{e^5 (3+m)}-\frac {2 c (2 c d-b e) (d+e x)^{4+m}}{e^5 (4+m)}+\frac {c^2 (d+e x)^{5+m}}{e^5 (5+m)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 178, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {712}
\begin {gather*} \frac {(d+e x)^{m+3} \left (-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2\right )}{e^5 (m+3)}+\frac {(d+e x)^{m+1} \left (a e^2-b d e+c d^2\right )^2}{e^5 (m+1)}-\frac {2 (2 c d-b e) (d+e x)^{m+2} \left (a e^2-b d e+c d^2\right )}{e^5 (m+2)}-\frac {2 c (2 c d-b e) (d+e x)^{m+4}}{e^5 (m+4)}+\frac {c^2 (d+e x)^{m+5}}{e^5 (m+5)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 712
Rubi steps
\begin {align*} \int (d+e x)^m \left (a+b x+c x^2\right )^2 \, dx &=\int \left (\frac {\left (c d^2-b d e+a e^2\right )^2 (d+e x)^m}{e^4}+\frac {2 (-2 c d+b e) \left (c d^2-b d e+a e^2\right ) (d+e x)^{1+m}}{e^4}+\frac {\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) (d+e x)^{2+m}}{e^4}-\frac {2 c (2 c d-b e) (d+e x)^{3+m}}{e^4}+\frac {c^2 (d+e x)^{4+m}}{e^4}\right ) \, dx\\ &=\frac {\left (c d^2-b d e+a e^2\right )^2 (d+e x)^{1+m}}{e^5 (1+m)}-\frac {2 (2 c d-b e) \left (c d^2-b d e+a e^2\right ) (d+e x)^{2+m}}{e^5 (2+m)}+\frac {\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) (d+e x)^{3+m}}{e^5 (3+m)}-\frac {2 c (2 c d-b e) (d+e x)^{4+m}}{e^5 (4+m)}+\frac {c^2 (d+e x)^{5+m}}{e^5 (5+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.35, size = 178, normalized size = 1.00 \begin {gather*} \frac {(d+e x)^{1+m} \left (-\frac {2 (d+e x) (-6 c d+b e (7+m)+2 c e (4+m) x) (a+x (b+c x))}{e^2 (4+m) (5+m)}+(a+x (b+c x))^2+\frac {2 (d+e x) \left (\frac {6 (2 c d-b e) \left (c d^2+e (-b d+a e)\right )}{2+m}-\frac {\left (12 c^2 d^2-b^2 e^2 (1+m)+4 c e (-3 b d+a e (4+m))\right ) (d+e x)}{3+m}\right )}{e^4 (4+m) (5+m)}\right )}{e (1+m)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(798\) vs.
\(2(178)=356\).
time = 0.81, size = 799, normalized size = 4.49 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 458 vs.
\(2 (181) = 362\).
time = 0.29, size = 458, normalized size = 2.57 \begin {gather*} \frac {{\left (x e + d\right )}^{m + 1} a^{2} e^{\left (-1\right )}}{m + 1} + \frac {2 \, {\left ({\left (m + 1\right )} x^{2} e^{2} + d m x e - d^{2}\right )} a b e^{\left (m \log \left (x e + d\right ) - 2\right )}}{m^{2} + 3 \, m + 2} + \frac {{\left ({\left (m^{2} + 3 \, m + 2\right )} x^{3} e^{3} + {\left (m^{2} + m\right )} d x^{2} e^{2} - 2 \, d^{2} m x e + 2 \, d^{3}\right )} b^{2} e^{\left (m \log \left (x e + d\right ) - 3\right )}}{m^{3} + 6 \, m^{2} + 11 \, m + 6} + \frac {2 \, {\left ({\left (m^{2} + 3 \, m + 2\right )} x^{3} e^{3} + {\left (m^{2} + m\right )} d x^{2} e^{2} - 2 \, d^{2} m x e + 2 \, d^{3}\right )} a c e^{\left (m \log \left (x e + d\right ) - 3\right )}}{m^{3} + 6 \, m^{2} + 11 \, m + 6} + \frac {2 \, {\left ({\left (m^{3} + 6 \, m^{2} + 11 \, m + 6\right )} x^{4} e^{4} + {\left (m^{3} + 3 \, m^{2} + 2 \, m\right )} d x^{3} e^{3} - 3 \, {\left (m^{2} + m\right )} d^{2} x^{2} e^{2} + 6 \, d^{3} m x e - 6 \, d^{4}\right )} b c e^{\left (m \log \left (x e + d\right ) - 4\right )}}{m^{4} + 10 \, m^{3} + 35 \, m^{2} + 50 \, m + 24} + \frac {{\left ({\left (m^{4} + 10 \, m^{3} + 35 \, m^{2} + 50 \, m + 24\right )} x^{5} e^{5} + {\left (m^{4} + 6 \, m^{3} + 11 \, m^{2} + 6 \, m\right )} d x^{4} e^{4} - 4 \, {\left (m^{3} + 3 \, m^{2} + 2 \, m\right )} d^{2} x^{3} e^{3} + 12 \, {\left (m^{2} + m\right )} d^{3} x^{2} e^{2} - 24 \, d^{4} m x e + 24 \, d^{5}\right )} c^{2} e^{\left (m \log \left (x e + d\right ) - 5\right )}}{m^{5} + 15 \, m^{4} + 85 \, m^{3} + 225 \, m^{2} + 274 \, m + 120} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 742 vs.
\(2 (181) = 362\).
time = 2.91, size = 742, normalized size = 4.17 \begin {gather*} \frac {{\left (24 \, c^{2} d^{5} + {\left ({\left (c^{2} m^{4} + 10 \, c^{2} m^{3} + 35 \, c^{2} m^{2} + 50 \, c^{2} m + 24 \, c^{2}\right )} x^{5} + 2 \, {\left (b c m^{4} + 11 \, b c m^{3} + 41 \, b c m^{2} + 61 \, b c m + 30 \, b c\right )} x^{4} + {\left ({\left (b^{2} + 2 \, a c\right )} m^{4} + 12 \, {\left (b^{2} + 2 \, a c\right )} m^{3} + 49 \, {\left (b^{2} + 2 \, a c\right )} m^{2} + 40 \, b^{2} + 80 \, a c + 78 \, {\left (b^{2} + 2 \, a c\right )} m\right )} x^{3} + 2 \, {\left (a b m^{4} + 13 \, a b m^{3} + 59 \, a b m^{2} + 107 \, a b m + 60 \, a b\right )} x^{2} + {\left (a^{2} m^{4} + 14 \, a^{2} m^{3} + 71 \, a^{2} m^{2} + 154 \, a^{2} m + 120 \, a^{2}\right )} x\right )} e^{5} + {\left (a^{2} d m^{4} + 14 \, a^{2} d m^{3} + 71 \, a^{2} d m^{2} + {\left (c^{2} d m^{4} + 6 \, c^{2} d m^{3} + 11 \, c^{2} d m^{2} + 6 \, c^{2} d m\right )} x^{4} + 154 \, a^{2} d m + 2 \, {\left (b c d m^{4} + 8 \, b c d m^{3} + 17 \, b c d m^{2} + 10 \, b c d m\right )} x^{3} + 120 \, a^{2} d + {\left ({\left (b^{2} + 2 \, a c\right )} d m^{4} + 10 \, {\left (b^{2} + 2 \, a c\right )} d m^{3} + 29 \, {\left (b^{2} + 2 \, a c\right )} d m^{2} + 20 \, {\left (b^{2} + 2 \, a c\right )} d m\right )} x^{2} + 2 \, {\left (a b d m^{4} + 12 \, a b d m^{3} + 47 \, a b d m^{2} + 60 \, a b d m\right )} x\right )} e^{4} - 2 \, {\left (a b d^{2} m^{3} + 12 \, a b d^{2} m^{2} + 47 \, a b d^{2} m + 60 \, a b d^{2} + 2 \, {\left (c^{2} d^{2} m^{3} + 3 \, c^{2} d^{2} m^{2} + 2 \, c^{2} d^{2} m\right )} x^{3} + 3 \, {\left (b c d^{2} m^{3} + 6 \, b c d^{2} m^{2} + 5 \, b c d^{2} m\right )} x^{2} + {\left ({\left (b^{2} + 2 \, a c\right )} d^{2} m^{3} + 9 \, {\left (b^{2} + 2 \, a c\right )} d^{2} m^{2} + 20 \, {\left (b^{2} + 2 \, a c\right )} d^{2} m\right )} x\right )} e^{3} + 2 \, {\left ({\left (b^{2} + 2 \, a c\right )} d^{3} m^{2} + 9 \, {\left (b^{2} + 2 \, a c\right )} d^{3} m + 20 \, {\left (b^{2} + 2 \, a c\right )} d^{3} + 6 \, {\left (c^{2} d^{3} m^{2} + c^{2} d^{3} m\right )} x^{2} + 6 \, {\left (b c d^{3} m^{2} + 5 \, b c d^{3} m\right )} x\right )} e^{2} - 12 \, {\left (2 \, c^{2} d^{4} m x + b c d^{4} m + 5 \, b c d^{4}\right )} e\right )} {\left (x e + d\right )}^{m} e^{\left (-5\right )}}{m^{5} + 15 \, m^{4} + 85 \, m^{3} + 225 \, m^{2} + 274 \, m + 120} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 10171 vs.
\(2 (162) = 324\).
time = 2.40, size = 10171, normalized size = 57.14 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1717 vs.
\(2 (181) = 362\).
time = 1.41, size = 1717, normalized size = 9.65 \begin {gather*} \frac {{\left (x e + d\right )}^{m} c^{2} m^{4} x^{5} e^{5} + {\left (x e + d\right )}^{m} c^{2} d m^{4} x^{4} e^{4} + 2 \, {\left (x e + d\right )}^{m} b c m^{4} x^{4} e^{5} + 10 \, {\left (x e + d\right )}^{m} c^{2} m^{3} x^{5} e^{5} + 2 \, {\left (x e + d\right )}^{m} b c d m^{4} x^{3} e^{4} + 6 \, {\left (x e + d\right )}^{m} c^{2} d m^{3} x^{4} e^{4} - 4 \, {\left (x e + d\right )}^{m} c^{2} d^{2} m^{3} x^{3} e^{3} + {\left (x e + d\right )}^{m} b^{2} m^{4} x^{3} e^{5} + 2 \, {\left (x e + d\right )}^{m} a c m^{4} x^{3} e^{5} + 22 \, {\left (x e + d\right )}^{m} b c m^{3} x^{4} e^{5} + 35 \, {\left (x e + d\right )}^{m} c^{2} m^{2} x^{5} e^{5} + {\left (x e + d\right )}^{m} b^{2} d m^{4} x^{2} e^{4} + 2 \, {\left (x e + d\right )}^{m} a c d m^{4} x^{2} e^{4} + 16 \, {\left (x e + d\right )}^{m} b c d m^{3} x^{3} e^{4} + 11 \, {\left (x e + d\right )}^{m} c^{2} d m^{2} x^{4} e^{4} - 6 \, {\left (x e + d\right )}^{m} b c d^{2} m^{3} x^{2} e^{3} - 12 \, {\left (x e + d\right )}^{m} c^{2} d^{2} m^{2} x^{3} e^{3} + 12 \, {\left (x e + d\right )}^{m} c^{2} d^{3} m^{2} x^{2} e^{2} + 2 \, {\left (x e + d\right )}^{m} a b m^{4} x^{2} e^{5} + 12 \, {\left (x e + d\right )}^{m} b^{2} m^{3} x^{3} e^{5} + 24 \, {\left (x e + d\right )}^{m} a c m^{3} x^{3} e^{5} + 82 \, {\left (x e + d\right )}^{m} b c m^{2} x^{4} e^{5} + 50 \, {\left (x e + d\right )}^{m} c^{2} m x^{5} e^{5} + 2 \, {\left (x e + d\right )}^{m} a b d m^{4} x e^{4} + 10 \, {\left (x e + d\right )}^{m} b^{2} d m^{3} x^{2} e^{4} + 20 \, {\left (x e + d\right )}^{m} a c d m^{3} x^{2} e^{4} + 34 \, {\left (x e + d\right )}^{m} b c d m^{2} x^{3} e^{4} + 6 \, {\left (x e + d\right )}^{m} c^{2} d m x^{4} e^{4} - 2 \, {\left (x e + d\right )}^{m} b^{2} d^{2} m^{3} x e^{3} - 4 \, {\left (x e + d\right )}^{m} a c d^{2} m^{3} x e^{3} - 36 \, {\left (x e + d\right )}^{m} b c d^{2} m^{2} x^{2} e^{3} - 8 \, {\left (x e + d\right )}^{m} c^{2} d^{2} m x^{3} e^{3} + 12 \, {\left (x e + d\right )}^{m} b c d^{3} m^{2} x e^{2} + 12 \, {\left (x e + d\right )}^{m} c^{2} d^{3} m x^{2} e^{2} - 24 \, {\left (x e + d\right )}^{m} c^{2} d^{4} m x e + {\left (x e + d\right )}^{m} a^{2} m^{4} x e^{5} + 26 \, {\left (x e + d\right )}^{m} a b m^{3} x^{2} e^{5} + 49 \, {\left (x e + d\right )}^{m} b^{2} m^{2} x^{3} e^{5} + 98 \, {\left (x e + d\right )}^{m} a c m^{2} x^{3} e^{5} + 122 \, {\left (x e + d\right )}^{m} b c m x^{4} e^{5} + 24 \, {\left (x e + d\right )}^{m} c^{2} x^{5} e^{5} + {\left (x e + d\right )}^{m} a^{2} d m^{4} e^{4} + 24 \, {\left (x e + d\right )}^{m} a b d m^{3} x e^{4} + 29 \, {\left (x e + d\right )}^{m} b^{2} d m^{2} x^{2} e^{4} + 58 \, {\left (x e + d\right )}^{m} a c d m^{2} x^{2} e^{4} + 20 \, {\left (x e + d\right )}^{m} b c d m x^{3} e^{4} - 2 \, {\left (x e + d\right )}^{m} a b d^{2} m^{3} e^{3} - 18 \, {\left (x e + d\right )}^{m} b^{2} d^{2} m^{2} x e^{3} - 36 \, {\left (x e + d\right )}^{m} a c d^{2} m^{2} x e^{3} - 30 \, {\left (x e + d\right )}^{m} b c d^{2} m x^{2} e^{3} + 2 \, {\left (x e + d\right )}^{m} b^{2} d^{3} m^{2} e^{2} + 4 \, {\left (x e + d\right )}^{m} a c d^{3} m^{2} e^{2} + 60 \, {\left (x e + d\right )}^{m} b c d^{3} m x e^{2} - 12 \, {\left (x e + d\right )}^{m} b c d^{4} m e + 24 \, {\left (x e + d\right )}^{m} c^{2} d^{5} + 14 \, {\left (x e + d\right )}^{m} a^{2} m^{3} x e^{5} + 118 \, {\left (x e + d\right )}^{m} a b m^{2} x^{2} e^{5} + 78 \, {\left (x e + d\right )}^{m} b^{2} m x^{3} e^{5} + 156 \, {\left (x e + d\right )}^{m} a c m x^{3} e^{5} + 60 \, {\left (x e + d\right )}^{m} b c x^{4} e^{5} + 14 \, {\left (x e + d\right )}^{m} a^{2} d m^{3} e^{4} + 94 \, {\left (x e + d\right )}^{m} a b d m^{2} x e^{4} + 20 \, {\left (x e + d\right )}^{m} b^{2} d m x^{2} e^{4} + 40 \, {\left (x e + d\right )}^{m} a c d m x^{2} e^{4} - 24 \, {\left (x e + d\right )}^{m} a b d^{2} m^{2} e^{3} - 40 \, {\left (x e + d\right )}^{m} b^{2} d^{2} m x e^{3} - 80 \, {\left (x e + d\right )}^{m} a c d^{2} m x e^{3} + 18 \, {\left (x e + d\right )}^{m} b^{2} d^{3} m e^{2} + 36 \, {\left (x e + d\right )}^{m} a c d^{3} m e^{2} - 60 \, {\left (x e + d\right )}^{m} b c d^{4} e + 71 \, {\left (x e + d\right )}^{m} a^{2} m^{2} x e^{5} + 214 \, {\left (x e + d\right )}^{m} a b m x^{2} e^{5} + 40 \, {\left (x e + d\right )}^{m} b^{2} x^{3} e^{5} + 80 \, {\left (x e + d\right )}^{m} a c x^{3} e^{5} + 71 \, {\left (x e + d\right )}^{m} a^{2} d m^{2} e^{4} + 120 \, {\left (x e + d\right )}^{m} a b d m x e^{4} - 94 \, {\left (x e + d\right )}^{m} a b d^{2} m e^{3} + 40 \, {\left (x e + d\right )}^{m} b^{2} d^{3} e^{2} + 80 \, {\left (x e + d\right )}^{m} a c d^{3} e^{2} + 154 \, {\left (x e + d\right )}^{m} a^{2} m x e^{5} + 120 \, {\left (x e + d\right )}^{m} a b x^{2} e^{5} + 154 \, {\left (x e + d\right )}^{m} a^{2} d m e^{4} - 120 \, {\left (x e + d\right )}^{m} a b d^{2} e^{3} + 120 \, {\left (x e + d\right )}^{m} a^{2} x e^{5} + 120 \, {\left (x e + d\right )}^{m} a^{2} d e^{4}}{m^{5} e^{5} + 15 \, m^{4} e^{5} + 85 \, m^{3} e^{5} + 225 \, m^{2} e^{5} + 274 \, m e^{5} + 120 \, e^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.55, size = 895, normalized size = 5.03 \begin {gather*} \frac {{\left (d+e\,x\right )}^m\,\left (a^2\,d\,e^4\,m^4+14\,a^2\,d\,e^4\,m^3+71\,a^2\,d\,e^4\,m^2+154\,a^2\,d\,e^4\,m+120\,a^2\,d\,e^4-2\,a\,b\,d^2\,e^3\,m^3-24\,a\,b\,d^2\,e^3\,m^2-94\,a\,b\,d^2\,e^3\,m-120\,a\,b\,d^2\,e^3+4\,a\,c\,d^3\,e^2\,m^2+36\,a\,c\,d^3\,e^2\,m+80\,a\,c\,d^3\,e^2+2\,b^2\,d^3\,e^2\,m^2+18\,b^2\,d^3\,e^2\,m+40\,b^2\,d^3\,e^2-12\,b\,c\,d^4\,e\,m-60\,b\,c\,d^4\,e+24\,c^2\,d^5\right )}{e^5\,\left (m^5+15\,m^4+85\,m^3+225\,m^2+274\,m+120\right )}+\frac {x\,{\left (d+e\,x\right )}^m\,\left (a^2\,e^5\,m^4+14\,a^2\,e^5\,m^3+71\,a^2\,e^5\,m^2+154\,a^2\,e^5\,m+120\,a^2\,e^5+2\,a\,b\,d\,e^4\,m^4+24\,a\,b\,d\,e^4\,m^3+94\,a\,b\,d\,e^4\,m^2+120\,a\,b\,d\,e^4\,m-4\,a\,c\,d^2\,e^3\,m^3-36\,a\,c\,d^2\,e^3\,m^2-80\,a\,c\,d^2\,e^3\,m-2\,b^2\,d^2\,e^3\,m^3-18\,b^2\,d^2\,e^3\,m^2-40\,b^2\,d^2\,e^3\,m+12\,b\,c\,d^3\,e^2\,m^2+60\,b\,c\,d^3\,e^2\,m-24\,c^2\,d^4\,e\,m\right )}{e^5\,\left (m^5+15\,m^4+85\,m^3+225\,m^2+274\,m+120\right )}+\frac {c^2\,x^5\,{\left (d+e\,x\right )}^m\,\left (m^4+10\,m^3+35\,m^2+50\,m+24\right )}{m^5+15\,m^4+85\,m^3+225\,m^2+274\,m+120}+\frac {x^3\,{\left (d+e\,x\right )}^m\,\left (m^2+3\,m+2\right )\,\left (b^2\,e^2\,m^2+9\,b^2\,e^2\,m+20\,b^2\,e^2+2\,b\,c\,d\,e\,m^2+10\,b\,c\,d\,e\,m-4\,c^2\,d^2\,m+2\,a\,c\,e^2\,m^2+18\,a\,c\,e^2\,m+40\,a\,c\,e^2\right )}{e^2\,\left (m^5+15\,m^4+85\,m^3+225\,m^2+274\,m+120\right )}+\frac {x^2\,\left (m+1\right )\,{\left (d+e\,x\right )}^m\,\left (b^2\,d\,e^2\,m^3+9\,b^2\,d\,e^2\,m^2+20\,b^2\,d\,e^2\,m-6\,b\,c\,d^2\,e\,m^2-30\,b\,c\,d^2\,e\,m+2\,a\,b\,e^3\,m^3+24\,a\,b\,e^3\,m^2+94\,a\,b\,e^3\,m+120\,a\,b\,e^3+12\,c^2\,d^3\,m+2\,a\,c\,d\,e^2\,m^3+18\,a\,c\,d\,e^2\,m^2+40\,a\,c\,d\,e^2\,m\right )}{e^3\,\left (m^5+15\,m^4+85\,m^3+225\,m^2+274\,m+120\right )}+\frac {c\,x^4\,{\left (d+e\,x\right )}^m\,\left (10\,b\,e+2\,b\,e\,m+c\,d\,m\right )\,\left (m^3+6\,m^2+11\,m+6\right )}{e\,\left (m^5+15\,m^4+85\,m^3+225\,m^2+274\,m+120\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________